1. Technical Field
The present invention relates in general to shared data transmission media and, in particular, to a method and system for optimizing bus access contention. Still more particularly, the present invention relates to tracking the number of activated stations on a shared bus, and dynamically adjusting data transmission preamble parameters in response thereto.
2. Description of the Related Art
Local-Area Networks (LANs), such as Ethernet and Token Ring, are used to transfer data among different end users. Use of these networks requires a concentrator to connect end users to the network in an efficient manner in an office environment. Cost for such connections range from $50 for Ethernet connections to $125 for Token Ring connections. For a low data transfer rate system management bus interconnection among servers that requires lower data transfer rates than typical LANs, the above-stated cost is prohibitively high.
Serial Data Transfer
A low-cost, high-reliability solution for system management architecture requiring low data transfer rates is serial data transfer. Serial data transfer is a form of data output that utilizes a digital communication interface for sending and receiving data in digital format. Serial data transfer is becoming a common method of transferring and collecting low volume data because it provides a reliable and fully standardized link between a transmitter and receiver. Any two devices equipped with a serial data interface can communicate with one another. A serial data interface also provides bi-directional communication so that operating parameters of a connected device can be remotely programmed by a host device. Another significant advantage of differential serial data transfer is that it is highly resistant to electrical noise.
Serial data interfaces are very versatile. Serial data that is sent and received between a sensor and host can be configured in a variety of ways. The Institute of Electrical and Electronics Engineers (IEEE) Recommended Standard 232 (RS-232) and Recommended Standard 422 (RS-422) are two standard serial data communication protocols that are widely utilized. The RS-232 protocol specifies that data is sent over a single wire utilizing voltage levels that vary between +12 volts and xe2x88x9212 volts with respect to a common ground. The maximum cable length for this protocol depends on the properties of the cable and the data transfer rate, but, 50 feet is the generally accepted maximum length. The maximum data transfer rate for RS-232 is typically 56,000 bits per second (bps).
The RS-422 protocol was designed to allow the use of longer cabling and faster data transfer rates. To achieve these improvements, differential voltages are utilized for transmitting data. Two wires (in addition to a ground wire) maintain differentially opposed voltages of +12 volts and xe2x88x9212 volts. Thus, if a noise spike occurs on one of the two data transmission wires, the noise spike will be overlooked because it is not accompanied by a corresponding inverse voltage on the opposing wire. Implementing the differential voltage technique of RS-422 permits utilization of cables with lengths of up to several hundred meters, and data rates exceeding 1 Mbps.
IEEE RS-485
A commonly utilized variation of RS-422 is the RS-485 protocol. RS-485 protocol utilizes the same two-wire differential voltage driving technique as RS-422, but RS-485 protocol also specifies that multiple devices can be connected to form an RS-485 architecture network. Computer systems management systems such as networked servers, may thus utilize an RS-485 architecture for networking non-data traffic nodes such as service processors within a network of servers (See FIG. 1). In the case of a service processor network application, RS-485 allows a single host (primary service processor) to monitor and coordinate more that one secondary service processor utilizing a single cable that branches off to each server in the network.
Shared Bus Contention
Today, a number of bus interfaces utilize collision detection as a method of determining when a bus is busy or when two stations have started a transmission simultaneously. This is true for Ethernet adapters and for serial networks that utilize the RS-485 protocol. When a collision is detected or when a station waiting to transmit a message xe2x80x9cseesxe2x80x9d a message transmitted on the bus, that station backs off a random amount of time before it can start a new transmission.
The protocol for sending data on the RS-485 interface is similar to Ethernet""s collision avoidance technique. The sending station listens for activity on the RS-485 interface. If there is activity, the sending station starts a randomized timer. When the timer expires, the sending station restarts the sending sequence. If there is no activity on the bus, the sending station sends a preamble of synchronization characters and xe2x80x9clistensxe2x80x9d for these same characters. If the received characters are not the same as the transmitted characters, a collision has occurred and the sending stations must retransmit the message after a random amount of time. This protocol operates efficiently in an Ethernet environment that provides concentrators for signal retransmission.
For economic reasons, many RS-485 system management configurations do not utilize concentrators. Given the extended length of RS-485 cabling signal power diminishes as the signals travel further along the bus structure. A transmitting station""s signals can overpower a weaker signal from a distant station resulting in an undetected collision. To avoid this problem a message preamble consisting of a series of synchronization (sync) characters is delivered prior to each data transfer. Random time intervals are inserted between each of the sync characters. The resulting effect is that two stations transmitting at the same time are able to detect the other station""s signals even though the first or subsequent character transmission occur at the same time.
FIG. 3 is a flow diagram depicting a conventional message transmission technique upon which the present invention improves. As shown at steps 302, 304, and 306, a message transmission attempt begins with the station listening for either a data or sync flag on the shared bus. In response to determining that another station is currently transmitting either a sync character or data, and as illustrated at step 306, a pre-determined delay is imposed upon the preamble assembly process. Steps 308 and 310 show the repetition of such delays until the station determines that no active transmission of any kind is occurring on the shared bus.
Upon determining that no active transmissions are currently being performed on the shared bus a message preamble transmission sequence is performed as illustrated at steps 316 through 330. A number of synchronization trials, N, as shown at step 314, is a pre-set constant. Under conventional random delay interval practice, a delay factor is generated by adding a randomly selected increment value, d, to a constant time interval value, D. It should be noted that although the randomized selection of d (step 320) must occur as depicted within the preamble transmission sequence, the determination of values for N (step 316) and D (step 320) are sequence independent.
As depicted in FIG. 3, a program loop which is depicted by steps 316 through 326, transmits synchronization characters, inserts a random delay between them, and also listens for other data transmissions on the bus. This loop is completed N times and then the message is transmitted to the RS-485 interface. While the system shown in FIG. 3 is inexpensive to implement (all collision detection is done is software and the hardware is not affected), it imposes a choice between two forms of latency. By setting a fixed number of sync characters excessive latency will be introduced as the direct result of unnecessarily lengthy preamble sequences or as the result of excessive detected or undetected data collisions due to an inadequate number of sync characters.
It can therefore be appreciated that a need exists for a method and system for dynamically adjusting message preamble parameters in accordance with actual system needs, such that network bandwidth is improved while maintaining a low collision rate.
A method and system for adjusting a message preamble on a shared bus are disclosed, wherein the message preamble includes N synchronization characters, and each of the synchronization characters is separated in time by a random delay interval. First, an activity status is determined for the shared bus in terms of the number of stations that are currently active on the bus. The number of synchronization characters is then adjusted according to the bus activity status. The activity status is also utilized as a dynamic adjustment parameter for the random delay interval that includes a fixed delay term, D, added to a randomly determined delay increment, d. In this manner the message preamble specification is optimized according to real-time network demands, such that latency and data collisions are minimized.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.